package org.oslims.client;

import org.oslims.domain.BaseUser;
import org.oslims.domain.Operator;

public class UserUtil {

	static BaseUser loggedInUser;
	static Operator testOperator;

	public static Operator getTestOperator() {
		return testOperator;
	}

	public static void setTestOperator(Operator testOperator) {
		UserUtil.testOperator = testOperator;
	}

	public static BaseUser getLoggedInUser() {
		return loggedInUser;
	}

	public static void setLoggedInUser(BaseUser loggedInUser) {
		UserUtil.loggedInUser = loggedInUser;
	}

	public static String getType() {

		if (loggedInUser == null)
			return null;

		return loggedInUser.getClass().getName();
	}
}
